.class Lcom/instagram/creation/video/f/af;
.super Ljava/lang/Object;
.source "VideoImportFragment.java"

# interfaces
.implements Landroid/view/View$OnTouchListener;


# instance fields
.field final synthetic a:Landroid/view/GestureDetector;

.field final synthetic b:Lcom/instagram/creation/video/f/ae;


# direct methods
.method constructor <init>(Lcom/instagram/creation/video/f/ae;Landroid/view/GestureDetector;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 210
    iput-object p1, p0, Lcom/instagram/creation/video/f/af;->b:Lcom/instagram/creation/video/f/ae;

    iput-object p2, p0, Lcom/instagram/creation/video/f/af;->a:Landroid/view/GestureDetector;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onTouch(Landroid/view/View;Landroid/view/MotionEvent;)Z
    .locals 8
    .parameter "v"
    .parameter "event"

    .prologue
    const/4 v0, 0x0

    .line 213
    invoke-virtual {p2}, Landroid/view/MotionEvent;->getAction()I

    move-result v1

    if-nez v1, :cond_1

    .line 215
    iget-object v1, p0, Lcom/instagram/creation/video/f/af;->b:Lcom/instagram/creation/video/f/ae;

    invoke-virtual {v1}, Lcom/instagram/creation/video/f/ae;->l()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Lcom/facebook/au;->trimhandle_bounds_x:I

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v1

    .line 216
    iget-object v2, p0, Lcom/instagram/creation/video/f/af;->b:Lcom/instagram/creation/video/f/ae;

    invoke-static {v2}, Lcom/instagram/creation/video/f/ae;->a(Lcom/instagram/creation/video/f/ae;)Lcom/instagram/creation/video/ui/TrimHandleImageView;

    move-result-object v2

    invoke-virtual {v2}, Lcom/instagram/creation/video/ui/TrimHandleImageView;->getWidth()I

    move-result v2

    .line 217
    invoke-virtual {p2}, Landroid/view/MotionEvent;->getRawX()F

    move-result v3

    mul-int/lit8 v4, v1, 0x2

    sub-int v4, v2, v4

    int-to-float v4, v4

    cmpg-float v3, v3, v4

    if-ltz v3, :cond_0

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getRawX()F

    move-result v3

    add-int/2addr v1, v2

    int-to-float v1, v1

    cmpl-float v1, v3, v1

    if-lez v1, :cond_1

    .line 252
    :cond_0
    :goto_0
    return v0

    .line 222
    :cond_1
    invoke-virtual {p2}, Landroid/view/MotionEvent;->getAction()I

    move-result v1

    packed-switch v1, :pswitch_data_0

    .line 239
    :cond_2
    :goto_1
    invoke-virtual {p2}, Landroid/view/MotionEvent;->getDownTime()J

    move-result-wide v0

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getEventTime()J

    move-result-wide v2

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getAction()I

    move-result v4

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getRawX()F

    move-result v5

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getRawY()F

    move-result v6

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getMetaState()I

    move-result v7

    invoke-static/range {v0 .. v7}, Landroid/view/MotionEvent;->obtain(JJIFFI)Landroid/view/MotionEvent;

    move-result-object v1

    .line 248
    iget-object v0, p0, Lcom/instagram/creation/video/f/af;->a:Landroid/view/GestureDetector;

    invoke-virtual {v0, v1}, Landroid/view/GestureDetector;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v0

    .line 250
    invoke-virtual {v1}, Landroid/view/MotionEvent;->recycle()V

    goto :goto_0

    .line 224
    :pswitch_0
    iget-object v1, p0, Lcom/instagram/creation/video/f/af;->b:Lcom/instagram/creation/video/f/ae;

    invoke-static {v1, v0}, Lcom/instagram/creation/video/f/ae;->a(Lcom/instagram/creation/video/f/ae;Z)Z

    .line 225
    iget-object v0, p0, Lcom/instagram/creation/video/f/af;->b:Lcom/instagram/creation/video/f/ae;

    invoke-static {v0}, Lcom/instagram/creation/video/f/ae;->b(Lcom/instagram/creation/video/f/ae;)Lcom/instagram/creation/video/d/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/creation/video/d/a;->b()V

    goto :goto_1

    .line 229
    :pswitch_1
    iget-object v0, p0, Lcom/instagram/creation/video/f/af;->b:Lcom/instagram/creation/video/f/ae;

    invoke-static {v0}, Lcom/instagram/creation/video/f/ae;->c(Lcom/instagram/creation/video/f/ae;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 231
    iget-object v0, p0, Lcom/instagram/creation/video/f/af;->b:Lcom/instagram/creation/video/f/ae;

    invoke-static {v0}, Lcom/instagram/creation/video/f/ae;->e(Lcom/instagram/creation/video/f/ae;)Lcom/instagram/pendingmedia/model/a;

    move-result-object v0

    iget-object v1, p0, Lcom/instagram/creation/video/f/af;->b:Lcom/instagram/creation/video/f/ae;

    invoke-static {v1}, Lcom/instagram/creation/video/f/ae;->d(Lcom/instagram/creation/video/f/ae;)D

    move-result-wide v1

    double-to-int v1, v1

    invoke-virtual {v0, v1}, Lcom/instagram/pendingmedia/model/a;->d(I)Lcom/instagram/pendingmedia/model/a;

    .line 232
    iget-object v0, p0, Lcom/instagram/creation/video/f/af;->b:Lcom/instagram/creation/video/f/ae;

    invoke-static {v0}, Lcom/instagram/creation/video/f/ae;->b(Lcom/instagram/creation/video/f/ae;)Lcom/instagram/creation/video/d/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/creation/video/d/a;->d()V

    goto :goto_1

    .line 222
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method
